package com.example.nonacademic_education.dao;

import com.example.nonacademic_education.entity.FileItemInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FiDepAssociationDao {
    @Select("select department_id from fi_dep_association where file_item_id=#{itemId}")
    List<Long> getGrantList(Long itemId);

    @Delete("delete from fi_dep_association where file_item_id=#{itemId}")
    Integer deleteByItemId(Long itemId);

    @Select("select department_id from fi_dep_association where file_item_id=#{itemId}")
    List<Long> getGrantListByItem(Long itemId);

    Integer addByItemAndDepartment(Long itemId, List<Long> addList);

    Integer deleteByDepartmentId(Long itemId, List<Long> delList);
}
